Skip to content

Parallel Implementation of Closeness and Harmonic Centrality #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from

Conversation

RohitP2005
Copy link

Parallel Implementation of Closeness and Harmonic Centrality

Description

This PR works on: #82

This PR includes the parallel implementation of closeness centrality and harmonic centrality from NetworkX using joblib.Parallel. These algorithms were chosen for their embarrassingly parallel nature, allowing efficient parallel computation. The implementation follows the existing nx-parallel structure while ensuring compatibility with NetworkX APIs.

Changes Included

  • Parallelized Closeness Centrality using joblib.Parallel
  • Parallelized Harmonic Centrality using joblib.Parallel
  • Added get_chunks parameter to allow user-defined chunking
  • Updated interface.py to include the new functions in ALGORITHMS
  • Updated __init__.py for module inclusion
  • Added docstrings following NetworkX conventions
  • Additional test cases and validation for get_chunks
  • Ran the timing script to generate performance heatmaps
  • Benchmarks for both implementations

Checklist

  • Implemented parallel versions of closeness and harmonic centrality
  • Ensured API compatibility with NetworkX
  • Added get_chunks parameter for chunk-based execution
  • Updated interface.py and __init__.py
  • Included proper docstrings
  • Added test cases for get_chunks
  • Ran timing script for performance validation
  • Added benchmarks for new functions

References


This PR ensures efficient parallel execution of closeness and harmonic centrality while maintaining API integrity. 🚀

@Schefflera-Arboricola Schefflera-Arboricola marked this pull request as draft March 11, 2025 09:11
@Schefflera-Arboricola
Copy link
Member

@RohitP2005 Please mark this PR "Ready for review" after aligning the PR's contents with the PR's description. Thanks!

@RohitP2005
Copy link
Author

@RohitP2005 Please mark this PR "Ready for review" after aligning the PR's contents with the PR's description. Thanks!

Will come up with those asap

@RohitP2005
Copy link
Author

Hey @Schefflera-Arboricola I would like a little help here
can u give me hint from the current failing CIs

@akshitasure12
Copy link
Contributor

akshitasure12 commented Jun 5, 2025

Hi @RohitP2005, Just wanted to check in -- are you still working on this PR? If not, I’d be happy to pick it up. Let me know, thanks!

@Schefflera-Arboricola
Copy link
Member

Schefflera-Arboricola commented Jun 5, 2025

The closeness_centrality algorithm is already being discussed and developed in PR #72 -- and this PR doesn't implement closeness centrality I think-- not sure why that's mentioned in the title

@Schefflera-Arboricola
Copy link
Member

Closing this PR due to inactivity. Please feel free to re-open and work on this @RohitP2005 if you still have the bandwidth to do so. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants